-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following startup guide throws Linker errors #150
Comments
Could you please show your code? or are you using the example's code? |
I'm using the Hello World example. |
You issue is most likely caused by a missing |
Please let me know if adding |
I fixed the issue. #define CROW_MAIN wasn't missing in my case but for some reason the define and include were switched around. Using the macro before including the header removed the errors. |
I also just recently ran into this issue. I had built the header using cmake from the instructions and was just trying to implement the json example. Adding "#define CROW_MAIN before the header fixed the issue. A frequently asked questions section in the README.md may help users quickly fix these types of issues and prevent any duplicate issues from being created. Can't guarantee everyone will read the documentation, but I only found this out by checking the issues section after reading the doc and seeing nothing on this. Also, this did not prevent building, but to avoid the cmake message "Not found TcMalloc", I had to do the following:
|
I noticed the Hello World example in the ReadMe was missing the #define CROW_MAIN, adding it there as well might prevent these issues from being reported. Since it's presented as a working implementation, people like myself might be inclined to directly implement this version instead of the example hidden deeper into the documentation. |
@JakeInit I'll make sure to make ti more clear that crow macros need to be always before the As for tcmalloc, it is optional and if available then crow will utilize it. Although I wouldn't advise anyone to use any tools developed by Google. |
@vcbnm This is absolutely my fault, I corrected the "Your First Application" section in the documentation but forgot to correct the readme. Thanks a lot for letting me know, I'll fix it immediately. |
I've followed the setup instructions on the Getting started page, using the crow_all.h from release 0.3. I'm trying to integrate Crow into an existing project but I've also tried using a clean project.
The following errors occur:
I'm using VS2019 and I followed the instructions, using the vcpkg.json to retrieve the dependencies. I've also tried an empty project but it still throws the same LNK2001 exceptions. Other things I have tried are; using nuget and manually setting Linker directories and dependencies, placing the dll's next to the executable, using crow.h and other files instead of crow_all.h, use VS2017 with the same instructions.
Regardless of how I approach it, these are the errors I end up with. My C++ skills are a bit rusty, am I overlooking something?
The text was updated successfully, but these errors were encountered: