G
Gurunama
Guest
I have made a Windows desktop program in C Winapi with Microsoft Visual C++ 2010, which I use from time to time, and to which I now and then add some new functionalities. A few days ago the program suddenly wouldn’t open when I tried to start it. I found this strange, because I couldn’t remember to have compiled the program with any new code since last time I used it. I then went into the source code, and when building it, got a long list of LNK2019 errors. I googled each of them, and fixed the issues by doing the recommendations. Most of them were fixed by adding some libraries to Project properties > Configuration properties > Linker > Input > Additional dependencies. I added User32.lib, Gdi32.lib, Advapi32.lib and Shell32.lib.
There is, however, one error I am not able to fix, and which is related to “tmainCRTStartup”. I therefore still get the following error message:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
fatal error LNK1120: 1 unresolved externals
I believe I have tried all the recommendations on the internet, but has not been able to resolve the issue. I therefore hope that somebody could help me with this.
Lately I have added some code for playing with a midi keyboard, like “midiInStart”. It is said that this requires the header file “mmeapi.h”, but which I don’t have available, and which I neither know where to download. Yet my program has been working for a long time without it.
I am very puzzled how all these errors suddenly can pop up, after the program has been working fine for a long time. I wonder what’s the reason for this. Great if someone could give an explanation.
Thanks in advance.
Continue reading...
There is, however, one error I am not able to fix, and which is related to “tmainCRTStartup”. I therefore still get the following error message:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
fatal error LNK1120: 1 unresolved externals
I believe I have tried all the recommendations on the internet, but has not been able to resolve the issue. I therefore hope that somebody could help me with this.
Lately I have added some code for playing with a midi keyboard, like “midiInStart”. It is said that this requires the header file “mmeapi.h”, but which I don’t have available, and which I neither know where to download. Yet my program has been working for a long time without it.
I am very puzzled how all these errors suddenly can pop up, after the program has been working fine for a long time. I wonder what’s the reason for this. Great if someone could give an explanation.
Thanks in advance.
Continue reading...