Forum: PC-Programmierung Windows-Konsolenanwendung ins Windows-Form


von student (Gast)


Lesenswert?

Hallo,

ich bin gerade dabei meine Konsolenanwendung in Visuall c++ 2010 express 
in eine Windows-Forms-Anwendung einzubinden.

Dafür habe ich einen Button "Measure" erstellt und meinen Code dort 
hinein kopiert.

Nur klappt dies nicht und das verstehe ich nicht. Dabei gibt er mir halt 
tonnenweise Fehler aus , die den Rahmen dieses Textes sprengen würde.

Es würde mich freuen wenn ihr mir weiter helfen könntet.

Code:
1
// NI_daq_2.cpp: Hauptprojektdatei.
2
// Diese Software erkennt ein digitales Ausgangssignal eines Schmitt- Triggers welches auf ein Drucksignal triggern soll.
3
// Der Trigger gibt den Startzeitpunkt um ein Analoges Signal eines Sensors auszulesen. Hier elektrochemische Sensor.
4
5
#include "stdafx.h"
6
#include <stdio.h>
7
#include "NIDAQmx.h"
8
#include <iostream>
9
10
using namespace System;
11
using namespace std;
12
using namespace System::IO;
13
14
#define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else
15
16
// ------Deklaration der Funktionen------//
17
18
19
int ReadPulse(void);            // Funktion für das digitale Signal
20
double AnalogRead(void);        // Funktion für das analoge Signal
21
22
//------Auslesebereich des Analogen Signals------//
23
24
25
double AnalogRead (void)
26
27
{
28
     const int   N=1000;                            // N: Anzahl der Abtastpunkte
29
30
     int32       error=0;
31
32
       TaskHandle  taskHandle=0;
33
34
       int32       read;
35
36
       float64     data[N];                    // Puffer für die abzuspeichernden Daten
37
38
       char        errBuff[2048]={'\0'};
39
40
     int         i;
41
     
42
     int         u;
43
44
     int       p;
45
46
     int         t;
47
48
     int         l;
49
50
     int         r;
51
52
     int         g;
53
54
     int         x;
55
56
     int         j;
57
58
     float       neu_Integral;
59
60
     float       IntegralFlächen[N-1];
61
62
     float       Integral_Basisabgleich;
63
64
     float       data_neu[N];
65
66
     float       integral;
67
68
     float       data_time[N];                // Puffer für die Zeitpunkte der Daten
69
70
     float       minimum;
71
72
     float f_abtast;                           // f_abtast: Abtastfrequenz in Hz
73
74
     f_abtast = 75.0 ;
75
76
     String ^dateiname="..\\e.chem.Sensor.txt";       // Erstellen einer Textdatei
77
78
     FileStream ^fs=nullptr;
79
     StreamWriter ^sw =nullptr;
80
81
// ------Task wird erstellt ("Messaufgabe")------//
82
83
84
  DAQmxErrChk (DAQmxCreateTask("", &taskHandle));      
85
86
//------Erstellen eines Channels um analoge Signale auszulesen------//
87
//------(TaskHandle taskHandle, const char physicalChannel[], const char nameToAssignToChannel[], int32 terminalConfig, 
88
//------float64 minVal, float64 maxVal, int32 units, const char customScaleName[]);------//
89
90
  DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle, "Dev3/ai0", "", DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_Volts, NULL));
91
92
//------Erstellen der Abtastfunktion------//
93
//------(TaskHandle taskHandle, const char source[], float64 rate, int32 activeEdge, int32 sampleMode, uInt64 sampsPerChanToAcquire);------//
94
95
  DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandle, "", f_abtast, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, N));      
96
97
// ------Start des Tasks (Start der Messung)------//
98
99
100
  DAQmxErrChk(DAQmxStartTask(taskHandle));
101
102
// ------Auslesen der anaolgen Abtastpunkte------//
103
// ------(TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, float64 readArray[], uInt32 arraySizeInSamps,
104
// int32 *sampsPerChanRead, bool32 *reserved);------//
105
106
107
  DAQmxErrChk(DAQmxReadAnalogF64(taskHandle, N, 20.0, DAQmx_Val_GroupByChannel, data, N, &read, NULL));  // Timeout ( Zeit, die das Programm auf Daten wartet) = 20 s
108
109
//------Ausgabe der Daten auf der Console------//
110
 if( read>1 )
111
    printf("Acquired %d samples\n",read);
112
    i=0;
113
    for(i=0;i<read;i++)
114
    {
115
       cout<<data[i]<<endl;
116
    }
117
    printf("--------------\n");
118
119
//------Rechnung für die Zeitpunkte der Datenpunkte------// 
120
121
    p=0;
122
    for(p=0;p<read;p++)
123
    {
124
      data_time[p]=p/f_abtast;                // Zeit des Datenpunkts = Datenpunkt / Abtastfrequenz
125
    }
126
127
//------Integral der Kurve ( grobe Näherung---keine Grenzwertbetrachtung----numerisch )------//
128
    
129
    r=0;
130
    for(r=0;r<read;r++)
131
    {
132
      data_neu[r]=((int) ((data[r]*10000)+0.5))/10000.0;                               // Runden der Datenpunkte auf die 4. Nachkommastelle
133
    }
134
135
136
    x=0;
137
    for(x=0;x<read-1;x++)                                                                 // Ausrechnen des kompletten Integrals inclusive Basis
138
    {
139
      IntegralFlächen[x]=(data_neu[x]*(1/f_abtast));
140
    }
141
142
    g=0;
143
    neu_Integral=0;
144
    for(g=0;g<read;g++)
145
    {
146
      integral=neu_Integral+IntegralFlächen[g];                                               // Aufsummieren aller Teilflächen 
147
      neu_Integral=integral;
148
    }
149
150
    j=0;                                                                              // Finden des kleinsten Datenpunkts
151
    minimum=data_neu[0];
152
    for(j=0;j<(read-1);j++)
153
    {
154
      if (minimum<data_neu[j+1])
155
      {
156
        minimum=minimum;
157
      }
158
159
      else
160
      {
161
        minimum=data_neu[j+1];
162
      }
163
    }
164
165
    Integral_Basisabgleich= integral -(minimum*(N/f_abtast));                                                               // Basisabgleich
166
167
    Integral_Basisabgleich=((int) ((Integral_Basisabgleich*10000)+0.5))/10000.0;                                            // Runden des Integrals
168
169
170
//------Schreiben der Textdaie in der die Datenpunkte aufgelistet sind------//
171
172
    try
173
    {
174
      fs= gcnew FileStream(dateiname,FileMode::Create);
175
      sw= gcnew StreamWriter(fs);
176
177
      u=0;
178
      for(u=0;u<read;u++)
179
      {
180
        sw->WriteLine ("{0}    {1}              {2}",data_neu[u],data_time[u],Integral_Basisabgleich);
181
      }
182
183
    }
184
185
    catch(Exception ^e)
186
    {
187
      Console::WriteLine(e->Message);
188
    }
189
190
    finally
191
    {
192
      if(sw)
193
        sw->Close();
194
    }
195
196
    Console::WriteLine();
197
198
    
199
200
Error:
201
202
       if( DAQmxFailed(error) )
203
204
              DAQmxGetExtendedErrorInfo(errBuff,2048);
205
206
       if( taskHandle!=0 )  {
207
208
              DAQmxStopTask(taskHandle);
209
210
              DAQmxClearTask(taskHandle);
211
212
       }
213
214
       if( DAQmxFailed(error) )
215
216
              printf("DAQmx Error: %s\n",errBuff);
217
218
              return 0;
219
220
 
221
}
222
223
224
//------Hauptprogramm------Enthält die Funktion für das digitale Signal------//
225
226
int main(void)
227
228
{
229
230
 int binaer;        // binaer : Variable die den Zustand des Schmitt-Triggers ( digitales Signal) übergeben bekommt
231
 int oldbinaer;     // oldbinaer : Vergleichsvariable
232
233
 oldbinaer=1;       // Initialisierung
234
 
235
 
236
            
237
238
 for(;;){                              // Endlosschleife in der permanent das digitale Signal abgefragt wird
239
 binaer = ReadPulse();                 // ReadPulse : Funktion um das digitale Signal abzufragen
240
241
 if (binaer < oldbinaer )              // Idee : wenn der jetztige Zustand kleiner ist als der vorherige, 
242
 {                                     // soll getriggert werden ( starten das analoge Signal auszulesen).
243
   AnalogRead();                     // ---> auf abfallende Flanke des Schmitt- Triggers wird getriggert
244
 }
245
 
246
 oldbinaer=binaer;                     // oldbinaer übernimmt für den nächsten Vergleich den jetztigen Zusatnd an
247
248
 
249
250
 
251
252
 } return 0;
253
}
254
255
int ReadPulse (void)
256
{
257
  int32    error=0;
258
  TaskHandle  taskHandle=0;
259
  uInt8    data_0[100];
260
  char    errBuff[2048]={'\0'};
261
  int32    i;
262
  int32    read,bytesPerSamp;
263
264
  /*********************************************/
265
  // DAQmx Configure Code
266
  /*********************************************/
267
  DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
268
  DAQmxErrChk (DAQmxCreateDIChan(taskHandle,"Dev3/port0/line0","",DAQmx_Val_ChanForAllLines));
269
270
  /*********************************************/
271
  // DAQmx Start Code
272
  /*********************************************/
273
  DAQmxErrChk (DAQmxStartTask(taskHandle));
274
275
  /*********************************************/
276
  // DAQmx Read Code
277
  /*********************************************/
278
  DAQmxErrChk (DAQmxReadDigitalLines(taskHandle,1,10.0,DAQmx_Val_GroupByChannel,data_0,100,&read,&bytesPerSamp,NULL));
279
280
  // assuming 8 channels acquired
281
  for(i=0;i<1;++i)
282
    //printf("channel %d: 0x%X\n",i,data_0[i]);
283
    
284
Error:
285
  if( DAQmxFailed(error) )
286
    DAQmxGetExtendedErrorInfo(errBuff,2048);
287
  if( taskHandle!=0 ) {
288
    /*********************************************/
289
    // DAQmx Stop Code
290
    /*********************************************/
291
    DAQmxStopTask(taskHandle);
292
    DAQmxClearTask(taskHandle);
293
  }
294
  if( DAQmxFailed(error) )
295
    printf("DAQmx Error: %s\n",errBuff);
296
  //printf("End of program, press Enter key to quit\n");
297
  //getchar();
298
  return( data_0[0]);
299
}
300
301
302
-------------------------------------------------

--

Mit den [ c ] [ /c ] -Tags wird so etwas lesbarer.

-rufus

: Bearbeitet durch User
von Peter II (Gast)


Lesenswert?

student schrieb:
> Nur klappt dies nicht und das verstehe ich nicht. Dabei gibt er mir halt
> tonnenweise Fehler aus , die den Rahmen dieses Textes sprengen würde.

dann schicke doch mal die ersten paar Fehler.

von Rufus Τ. F. (rufus) Benutzerseite


Lesenswert?

student schrieb:
> Dabei gibt er mir halt tonnenweise Fehler aus , die den Rahmen dieses
> Textes sprengen würde.
>
> Es würde mich freuen wenn ihr mir weiter helfen könntet.

Mit Deinem Code kann man nichts anfangen. Interessant sind die Fehler - 
wobei bei C-artigen Programmiersprachen (Du nutzt das .Net-Geraffel) 
immer der Anfang der Fehlermeldungen interessant ist, d.h. die ersten 
paar Zeilen. Der Rest sind häufig Folgefehler und daher bei der 
Fehlerbeseitigung nicht relevant.

von student (Gast)


Lesenswert?

Alles klar .

Hier die ersten Fehler:

error C2870: 'vc_attributes': Eine Namespace-Definition muss entweder im 
Dateigültigkeitsbereich oder unmittelbar in einer anderen 
Namespace-Definition angezeigt werden

"vc_attributes": Das Symbol links neben "::" muss ein Typ sein.

'YesNoMaybe': Ist kein Element von '`global namespace''

Syntaxfehler: Fehlendes ';' vor Bezeichner 'SA_YesNoMaybe'

Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" 
wird von C++ nicht unterstützt.

von Peter II (Gast)


Lesenswert?

student schrieb:
> error C2870: 'vc_attributes': Eine Namespace-Definition muss entweder im
> Dateigültigkeitsbereich oder unmittelbar in einer anderen
> Namespace-Definition angezeigt werden
>
> "vc_attributes": Das Symbol links neben "::" muss ein Typ sein.
>
> 'YesNoMaybe': Ist kein Element von '`global namespace''
>
> Syntaxfehler: Fehlendes ';' vor Bezeichner 'SA_YesNoMaybe'

weder vc_attributes noch YesNoMaybe kommt bei dir im Quelltext vor, das 
hilft uns also wenig weiter.

von Rufus Τ. F. (rufus) Benutzerseite


Lesenswert?

student schrieb:
> error C2870: 'vc_attributes':

In Deinem Code da oben taucht das nicht auf.

von student (Gast)


Lesenswert?

Tut mir leid hier der Bereich in dem es steht.
1
/***
2
*SourceAnnotations.h - Source Annotation definitions
3
*
4
*       Copyright (c) Microsoft Corporation. All rights reserved.
5
*
6
*Purpose:
7
*       Defines internal structures used by the Source Code analysis engine.
8
*
9
****/
10
11
#if _MSC_VER >= 1400
12
13
#pragma once
14
15
#ifndef _M_CEE_SAFE  // Source annotation attributes don't work with /clr:safe
16
17
#if !defined(_W64)
18
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
19
#define _W64 __w64
20
#else
21
#define _W64
22
#endif
23
#endif
24
25
#ifndef _SIZE_T_DEFINED
26
#ifdef  _WIN64
27
typedef unsigned __int64    size_t;
28
#else
29
typedef _W64 unsigned int   size_t;
30
#endif
31
#define _SIZE_T_DEFINED
32
#endif
33
34
#ifndef _WCHAR_T_DEFINED
35
typedef unsigned short wchar_t;
36
#define _WCHAR_T_DEFINED
37
#endif
38
39
40
#pragma push_macro( "SA" )
41
#pragma push_macro( "REPEATABLE" )
42
43
#ifdef __cplusplus
44
#define SA( id ) id
45
#define REPEATABLE [repeatable]
46
#else  // !__cplusplus
47
#define SA( id ) SA_##id
48
#define REPEATABLE
49
#endif  // !__cplusplus
50
51
#ifdef __cplusplus
52
namespace vc_attributes
53
{
54
#endif  // __cplusplus
55
56
enum SA( YesNoMaybe )
57
{
58
  // Choose values that we can detect as invalid if they are or'd together
59
  SA( No ) = 0x0fff0001,
60
  SA( Maybe ) = 0x0fff0010,
61
  SA( Yes ) = 0x0fff0100
62
};
63
64
typedef enum SA( YesNoMaybe ) SA( YesNoMaybe );
65
66
enum SA( AccessType )
67
{
68
  SA( NoAccess ) = 0,
69
  SA( Read ) = 1,
70
  SA( Write ) = 2,
71
  SA( ReadWrite ) = 3
72
};
73
74
typedef enum SA( AccessType ) SA( AccessType );
75
76
#ifndef SAL_NO_ATTRIBUTE_DECLARATIONS
77
78
REPEATABLE
79
[source_annotation_attribute( SA( Parameter ) )]
80
struct PreAttribute
81
{
82
#ifdef __cplusplus
83
  PreAttribute();
84
#endif
85
86
  unsigned int Deref;
87
  SA( YesNoMaybe ) Valid;
88
  SA( YesNoMaybe ) Null;
89
  SA( YesNoMaybe ) Tainted;
90
  SA( AccessType ) Access;
91
  size_t ValidElementsConst;
92
  size_t ValidBytesConst;
93
  const wchar_t* ValidElements;
94
  const wchar_t* ValidBytes;
95
  const wchar_t* ValidElementsLength;
96
  const wchar_t* ValidBytesLength;
97
  size_t WritableElementsConst;
98
  size_t WritableBytesConst;
99
  const wchar_t* WritableElements;
100
  const wchar_t* WritableBytes;
101
  const wchar_t* WritableElementsLength;
102
  const wchar_t* WritableBytesLength;
103
  size_t ElementSizeConst;
104
  const wchar_t* ElementSize;
105
  SA( YesNoMaybe ) NullTerminated;
106
  const wchar_t* Condition;
107
};
108
109
REPEATABLE
110
[source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )]
111
struct PostAttribute
112
{
113
#ifdef __cplusplus
114
  PostAttribute();
115
#endif
116
117
  unsigned int Deref;
118
  SA( YesNoMaybe ) Valid;
119
  SA( YesNoMaybe ) Null;
120
  SA( YesNoMaybe ) Tainted;
121
  SA( AccessType ) Access;
122
  size_t ValidElementsConst;
123
  size_t ValidBytesConst;
124
  const wchar_t* ValidElements;
125
  const wchar_t* ValidBytes;
126
  const wchar_t* ValidElementsLength;
127
  const wchar_t* ValidBytesLength;
128
  size_t WritableElementsConst;
129
  size_t WritableBytesConst;
130
  const wchar_t* WritableElements;
131
  const wchar_t* WritableBytes;
132
  const wchar_t* WritableElementsLength;
133
  const wchar_t* WritableBytesLength;
134
  size_t ElementSizeConst;
135
  const wchar_t* ElementSize;
136
  SA( YesNoMaybe ) NullTerminated;
137
  SA( YesNoMaybe ) MustCheck;
138
  const wchar_t* Condition;
139
};
140
141
[source_annotation_attribute( SA( Parameter ) )]
142
struct FormatStringAttribute
143
{
144
#ifdef __cplusplus
145
  FormatStringAttribute();
146
#endif
147
148
  const wchar_t* Style;
149
  const wchar_t* UnformattedAlternative;
150
};
151
152
REPEATABLE
153
[source_annotation_attribute( SA( ReturnValue ) )]
154
struct InvalidCheckAttribute
155
{
156
#ifdef __cplusplus
157
  InvalidCheckAttribute();
158
#endif
159
160
  long Value;
161
};
162
163
[source_annotation_attribute( SA( Method ) )]
164
struct SuccessAttribute
165
{
166
#ifdef __cplusplus
167
  SuccessAttribute();
168
#endif
169
170
  const wchar_t* Condition;
171
};
172
173
REPEATABLE
174
[source_annotation_attribute( SA( Parameter ) )]
175
struct PreBoundAttribute
176
{
177
#ifdef __cplusplus
178
  PreBoundAttribute();
179
#endif
180
  unsigned int Deref;
181
};
182
183
REPEATABLE
184
[source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )]
185
struct PostBoundAttribute
186
{
187
#ifdef __cplusplus
188
  PostBoundAttribute();
189
#endif
190
  unsigned int Deref;
191
};
192
193
REPEATABLE
194
[source_annotation_attribute( SA( Parameter ) )]
195
struct PreRangeAttribute
196
{
197
#ifdef __cplusplus
198
  PreRangeAttribute();
199
#endif
200
  unsigned int Deref;
201
  const char* MinVal;
202
  const char* MaxVal;
203
};
204
205
REPEATABLE
206
[source_annotation_attribute( SA( Parameter )|SA( ReturnValue ) )]
207
struct PostRangeAttribute
208
{
209
#ifdef __cplusplus
210
  PostRangeAttribute();
211
#endif
212
  unsigned int Deref;
213
  const char* MinVal;
214
  const char* MaxVal;
215
};
216
217
#endif  // !SAL_NO_ATTRIBUTE_DECLARATIONS
218
219
#ifdef __cplusplus
220
};  // namespace vc_attributes
221
#endif  // __cplusplus
222
223
#pragma pop_macro( "REPEATABLE" )
224
#pragma pop_macro( "SA" )
225
226
#ifdef __cplusplus
227
228
#define SA_All All
229
#define SA_Class Class
230
#define SA_Constructor Constructor
231
#define SA_Delegate Delegate
232
#define SA_Enum Enum
233
#define SA_Event Event
234
#define SA_Field Field
235
#define SA_GenericParameter GenericParameter
236
#define SA_Interface Interface
237
#define SA_Method Method
238
#define SA_Module Module
239
#define SA_Parameter Parameter
240
#define SA_Property Property
241
#define SA_ReturnValue ReturnValue
242
#define SA_Struct Struct
243
244
typedef ::vc_attributes::YesNoMaybe SA_YesNoMaybe;
245
const ::vc_attributes::YesNoMaybe SA_Yes = ::vc_attributes::Yes;
246
const ::vc_attributes::YesNoMaybe SA_No = ::vc_attributes::No;
247
const ::vc_attributes::YesNoMaybe SA_Maybe = ::vc_attributes::Maybe;
248
249
typedef ::vc_attributes::AccessType SA_AccessType;
250
const ::vc_attributes::AccessType SA_NoAccess = ::vc_attributes::NoAccess;
251
const ::vc_attributes::AccessType SA_Read = ::vc_attributes::Read;
252
const ::vc_attributes::AccessType SA_Write = ::vc_attributes::Write;
253
const ::vc_attributes::AccessType SA_ReadWrite = ::vc_attributes::ReadWrite;
254
255
#ifndef SAL_NO_ATTRIBUTE_DECLARATIONS
256
typedef ::vc_attributes::PreAttribute          SA_Pre;
257
typedef ::vc_attributes::PostAttribute         SA_Post;
258
typedef ::vc_attributes::FormatStringAttribute SA_FormatString;
259
typedef ::vc_attributes::InvalidCheckAttribute SA_InvalidCheck; /*???*/
260
typedef ::vc_attributes::SuccessAttribute      SA_Success;
261
typedef ::vc_attributes::PreBoundAttribute     SA_PreBound;
262
typedef ::vc_attributes::PostBoundAttribute    SA_PostBound;
263
typedef ::vc_attributes::PreRangeAttribute     SA_PreRange;
264
typedef ::vc_attributes::PostRangeAttribute    SA_PostRange;
265
#endif //!SAL_NO_ATTRIBUTE_DECLARATIONS
266
267
#else  // !__cplusplus
268
269
typedef struct PreAttribute SA_Pre;
270
typedef struct PreAttribute PreAttribute;
271
typedef struct PostAttribute SA_Post;
272
typedef struct PostAttribute PostAttribute;
273
typedef struct FormatStringAttribute SA_FormatString;
274
typedef struct InvalidCheckAttribute SA_InvalidCheck; /*???*/
275
typedef struct SuccessAttribute      SA_Success;
276
typedef struct PreBoundAttribute     SA_PreBound;
277
typedef struct PostBoundAttribute    SA_PostBound;
278
typedef struct PreRangeAttribute     SA_PreRange;
279
typedef struct PostRangeAttribute    SA_PostRange;
280
281
#endif  // __cplusplus
282
283
#endif  // !_M_CEE_SAFE
284
285
#ifdef _MANAGED
286
287
#ifdef CODE_ANALYSIS
288
#define SA_SUPPRESS_MESSAGE( category, id, ... ) [::System::Diagnostics::CodeAnalysis::SuppressMessage( category, id, __VA_ARGS__ )]
289
#define CA_SUPPRESS_MESSAGE( ... ) [System::Diagnostics::CodeAnalysis::SuppressMessage( __VA_ARGS__ )]
290
#define CA_GLOBAL_SUPPRESS_MESSAGE( ... ) [assembly:System::Diagnostics::CodeAnalysis::SuppressMessage( __VA_ARGS__ )]
291
#else  // !CODE_ANALYSIS
292
#define SA_SUPPRESS_MESSAGE( category, id, ... )
293
#define CA_SUPPRESS_MESSAGE( ... )
294
#define CA_GLOBAL_SUPPRESS_MESSAGE( ... ) 
295
#endif  // !CODE_ANALYSIS
296
297
#endif  // _MANAGED
298
299
// Windows SDK Update Vista Beta2 (June 2006): __analysis_assume defined by specstrings.h
300
#ifdef _PREFAST_
301
// #define __analysis_assume(expr) __assume(expr)
302
#else  // !_PREFAST_
303
// #define __analysis_assume(expr) 
304
#endif  // _PREFAST_
305
306
307
#endif  // _MSC_VER >= 1400

--
Wie oft noch?

Verwende die Tags für die Code-Formatierung

-rufus

: Bearbeitet durch User
von Borislav B. (boris_b)


Lesenswert?

Ich wusste garnicht, dass C++ WinForms unterstützt...
Was genau hast du da für einen Projekttyp aufgesetzt?

von student (Gast)


Lesenswert?

also der Projekttyp ist denke ich .sln

von Borislav B. (boris_b)


Lesenswert?

student schrieb:
> also der Projekttyp ist denke ich .sln

Nein, dass ist die Dateinamenserweiterung der Visual Studio Solution 
files.

Was ich meine:
Hast du ein C++, C# oder C++/CLI-Projekt?

von student (Gast)


Lesenswert?

C++/CLI-Projekt

von Borislav B. (boris_b)


Lesenswert?

Dann lies mal das hier:
http://blog.kalmbach-software.de/de/2010/03/05/ccli-und-winforms-macht-keinen-sinn/

Kurzum:
C++/CLI ist eine Sprache, die nur für Übergänge zwischen .NET und native 
Code gedacht ist. Man sollte schon ein bisschen Ahnung haben, bevor man 
sich da ran traut.

Warum machst du die Anwendung nicht z.B. in C#, und bindest deine 
Konsolenanwendung als externen Prozess "unter der Haube" ein?
Oder verwendest reines C++ und ein anderes GUI Framework (wxWidgets 
etc.)?

von student (Gast)


Lesenswert?

Weil ich das nicht selbst zu entscheiden habe.

Ich habe tatsächlich wenig Ahnung. Nur muss das Problem trotzdem gelöst 
werden.

von Peter II (Gast)


Lesenswert?

student schrieb:
> Ich habe tatsächlich wenig Ahnung. Nur muss das Problem trotzdem gelöst
> werden.

dann musst du das Programm umschreiben.

von student (Gast)


Lesenswert?

Habe das Problem jetzt gelöst bekommen.

Es lag schlicht und ergreifend daran,dass ich vergessen hatte die 
genutzten libariers zu linken :).

Trotzdem nochmals vielen dank an alle.

von Vlad T. (vlad_tepesch)


Lesenswert?

student schrieb:
> float       IntegralFl_ä_chen[N-1];

Wtf

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.