Click here to Skip to main content
15,898,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Exiting Application Pin
LunaticFringe7-Mar-10 9:22
LunaticFringe7-Mar-10 9:22 
GeneralRe: Exiting Application Pin
Tim Craig7-Mar-10 13:27
Tim Craig7-Mar-10 13:27 
QuestionCompiling .cpp made from Matlab > Errors Pin
skyhr6-Mar-10 4:20
skyhr6-Mar-10 4:20 
AnswerRe: Compiling .cpp made from Matlab > Errors Pin
Eugen Podsypalnikov6-Mar-10 8:57
Eugen Podsypalnikov6-Mar-10 8:57 
GeneralRe: Compiling .cpp made from Matlab > Errors Pin
skyhr6-Mar-10 9:47
skyhr6-Mar-10 9:47 
GeneralRe: Compiling .cpp made from Matlab > Errors Pin
Richard MacCutchan6-Mar-10 21:26
mveRichard MacCutchan6-Mar-10 21:26 
GeneralRe: Compiling .cpp made from Matlab > Errors Pin
Eugen Podsypalnikov7-Mar-10 4:19
Eugen Podsypalnikov7-Mar-10 4:19 
AnswerRe: Compiling .cpp made from Matlab > Errors Pin
Avi Berger6-Mar-10 21:28
Avi Berger6-Mar-10 21:28 
Long post. I think I read more questions in it than you actually asked. Smile | :)

I have no personal experience with MatLab or MetaTrader, so at some point here I might be indulging in a bit of speculation. (You do know about speculation, no? Smile | :) )

skyhr wrote:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

The references to crt0.obj and unresolved external symbol _main sound to me like the build configuration is trying to pull in the start up code for a standalone program rather than the DLL that you are trying for. Are you sure that you have your project configured for a DLL and not an exe? Another possibility: I have seen comments that this can be caused by calling for _ATL_MIN_CRT in your project settings. I believe that for your purposes, you will not be using ATL at all, so check your project settings for that.

skyhr wrote:
I've done ... is include the necessary .lib files - mclmcr.lib mclmcrrt.lib ...

--------------------Configuration: libmatrix - Win32 Debug--------------------
...
libmatrix.obj : error LNK2001: unresolved external symbol ___MCC_libmatrix_component_data



First a side note. There are several ways that you tell a linker what to include: entries in a project file, command line arguments, and embedded directives in a code module. The pragma mentioned by the earlier poster is the latter method. When you cleared up most of your unresolved externals by including a couple of libs, you probably did it via a project file. It works just fine that way too. The matlab build probably used the command line. So, the reason matlab could build successfully without the pragma directives was that it used a different method to tell the linker about the library. They are all legitimate approaches.

Now, I was going to say that this unresolved external just meant that you were missing another lib file. Then I looked closer and decided that I was wrong. Notice the libmatrix in the symbol which is your name, not matlab's. Also note the line extern mclComponentData __MCC_libmatrix_component_data; in you cpp file. This says that there is such a thing, but it is either being defined later or in a different file. Further, the matlab site states: Encrypts MATLAB code so that it cannot be viewed or modified. My current theory is that the matlab compiler is taking your code, mucking with it, and sticking it in another file. This one just contains the interface. You said, "This got me several files, like the .cpp, .h, and .dll files." Is there another file? Maybe even a .obj file? (but not, I think, plain libmatrix.obj)

Hopefully this will help you get a build. I think there will be issues dealing with the Metatrader interface, but that is the next step. I think it will also require more information.
Please do not read this signature.

QuestionHow to pass datas to a modal dialog? Pin
Aric Wang5-Mar-10 23:29
Aric Wang5-Mar-10 23:29 
AnswerRe: How to pass datas to a modal dialog? Pin
Richard MacCutchan5-Mar-10 23:33
mveRichard MacCutchan5-Mar-10 23:33 
AnswerRe: How to pass datas to a modal dialog? Pin
Eugen Podsypalnikov6-Mar-10 8:31
Eugen Podsypalnikov6-Mar-10 8:31 
AnswerRe: How to pass datas to a modal dialog? Pin
enhzflep6-Mar-10 19:33
enhzflep6-Mar-10 19:33 
Question[MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window [modified] Pin
rudyono5-Mar-10 22:59
rudyono5-Mar-10 22:59 
AnswerRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
Richard MacCutchan5-Mar-10 23:05
mveRichard MacCutchan5-Mar-10 23:05 
GeneralRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
rudyono5-Mar-10 23:13
rudyono5-Mar-10 23:13 
GeneralRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
Richard MacCutchan5-Mar-10 23:29
mveRichard MacCutchan5-Mar-10 23:29 
AnswerRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
Eugen Podsypalnikov6-Mar-10 8:51
Eugen Podsypalnikov6-Mar-10 8:51 
AnswerRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
Avi Berger6-Mar-10 17:25
Avi Berger6-Mar-10 17:25 
GeneralRe: [MFC] Error when call function CreateDialog in method InitInstance in order to create a modeless dialog as main window Pin
rudyono12-Mar-10 4:23
rudyono12-Mar-10 4:23 
Questionconvert a CString value to DWORD Pin
learningvisualc5-Mar-10 20:43
learningvisualc5-Mar-10 20:43 
AnswerRe: convert a CString value to DWORD Pin
wangningyu5-Mar-10 22:34
wangningyu5-Mar-10 22:34 
AnswerRe: convert a CString value to DWORD Pin
loyal ginger6-Mar-10 1:59
loyal ginger6-Mar-10 1:59 
AnswerRe: convert a CString value to DWORD Pin
Alain Rist6-Mar-10 5:00
Alain Rist6-Mar-10 5:00 
QuestionAVIStreamWrite failed Pin
gmallax5-Mar-10 20:01
gmallax5-Mar-10 20:01 
GeneralRe: AVIStreamWrite failed Pin
jaapestaartje18-Oct-10 1:21
jaapestaartje18-Oct-10 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.