Static Library Issue
-
Hey ppl, I have create a static library project and build it successfully on debug mode and release mode. :thumbsup: Now I have a different project which uses this static library with #paragma comment (lib, mylib) When I compile and run my project in debug mode it runs successfully. :) When I compile my project in release mode it compiles successfully but wont run. :doh: And when I try to run release mode inside Visual Studio it gives me these errors: Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx Error 2 fatal error C1083: Cannot open source file: '.\XTexture.cpp': No such file or directory c1xx Error 3 fatal error C1083: Cannot open source file: '.\XTextBox.cpp': No such file or directory c1xx Error 4 fatal error C1083: Cannot open source file: '.\XText.cpp': No such file or directory c1xx Error 5 fatal error C1083: Cannot open source file: '.\XPen.cpp': No such file or directory c1xx :wtf: ... list goes on. These files are included in mylib.lib that's why I used static lib. So why this happens? :confused: One more thing, my library's file size in debug mode is 3.103Kb and in release mode 11.349Kb. I expect it would be more less in relase mode.. :~ Thank you... :-D
-
Hey ppl, I have create a static library project and build it successfully on debug mode and release mode. :thumbsup: Now I have a different project which uses this static library with #paragma comment (lib, mylib) When I compile and run my project in debug mode it runs successfully. :) When I compile my project in release mode it compiles successfully but wont run. :doh: And when I try to run release mode inside Visual Studio it gives me these errors: Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx Error 2 fatal error C1083: Cannot open source file: '.\XTexture.cpp': No such file or directory c1xx Error 3 fatal error C1083: Cannot open source file: '.\XTextBox.cpp': No such file or directory c1xx Error 4 fatal error C1083: Cannot open source file: '.\XText.cpp': No such file or directory c1xx Error 5 fatal error C1083: Cannot open source file: '.\XPen.cpp': No such file or directory c1xx :wtf: ... list goes on. These files are included in mylib.lib that's why I used static lib. So why this happens? :confused: One more thing, my library's file size in debug mode is 3.103Kb and in release mode 11.349Kb. I expect it would be more less in relase mode.. :~ Thank you... :-D
dehseth wrote:
When I compile my project in release mode it compiles successfully but wont run. D'Oh! And when I try to run release mode inside Visual Studio it gives me these errors:
What do you mean by "Run" ? These errors are compilation errors, you can't have those when you run your program :confused:
dehseth wrote:
Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
What is "c1xx" at the end ? Those files which give errors (XWindow.cpp, XTexture.cpp, ...), are they part of your exe or part of your static lib ?
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++ -
dehseth wrote:
When I compile my project in release mode it compiles successfully but wont run. D'Oh! And when I try to run release mode inside Visual Studio it gives me these errors:
What do you mean by "Run" ? These errors are compilation errors, you can't have those when you run your program :confused:
dehseth wrote:
Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx
What is "c1xx" at the end ? Those files which give errors (XWindow.cpp, XTexture.cpp, ...), are they part of your exe or part of your static lib ?
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++Application compiles and link successfully: ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== But when I double click to generated exe file it crashed X| So I open visual studio window and press Run button and it gives me these errors :wtf: I do not get why I get em. There's no c1xx file... :confused: Should I do anything more than putting #pragma comment (lib, "mylib") and include the main header file to make it run on release mode? :confused:
-
Hey ppl, I have create a static library project and build it successfully on debug mode and release mode. :thumbsup: Now I have a different project which uses this static library with #paragma comment (lib, mylib) When I compile and run my project in debug mode it runs successfully. :) When I compile my project in release mode it compiles successfully but wont run. :doh: And when I try to run release mode inside Visual Studio it gives me these errors: Error 1 fatal error C1083: Cannot open source file: '.\XWindow.cpp': No such file or directory c1xx Error 2 fatal error C1083: Cannot open source file: '.\XTexture.cpp': No such file or directory c1xx Error 3 fatal error C1083: Cannot open source file: '.\XTextBox.cpp': No such file or directory c1xx Error 4 fatal error C1083: Cannot open source file: '.\XText.cpp': No such file or directory c1xx Error 5 fatal error C1083: Cannot open source file: '.\XPen.cpp': No such file or directory c1xx :wtf: ... list goes on. These files are included in mylib.lib that's why I used static lib. So why this happens? :confused: One more thing, my library's file size in debug mode is 3.103Kb and in release mode 11.349Kb. I expect it would be more less in relase mode.. :~ Thank you... :-D