Visual Studio: mylib.lib is not a valid win32 application

thebluetropics 1,046 Reputation points
2022-10-12T09:45:39.51+00:00

I have a solution with two projects: mylib and mylib-test

mylib is a Static Library project.
mylib-test is a Desktop Application project.

mylib-test reference the mylib project.
mylib-test also include the mylib project directory, in order to include mylib.h inside mylib project.

The build order is: mylib, mylib-test
There is correct build order.

However, I got this when I try to run the mylib-test:

249692-image.png

Of course, tried exclude mylib from build. But still didnt work.

Windows development | Windows API - Win32
Developer technologies | Visual Studio | Debugging
Developer technologies | C++
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 49,551 Reputation points
    2022-10-12T10:00:01.317+00:00

    Set your Windows desktop application project, mylib-test as the solution startup project.

    For example, in the property page for the solution -

    249712-startup.png

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.