Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, EternallyCurious, howardR, 1 invisible), 623 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
C++ linker problems #486587
09/08/22 08:52
09/08/22 08:52
Joined: Jan 2022
Posts: 58
N
NorbertSz Offline OP
Junior Member
NorbertSz  Offline OP
Junior Member
N

Joined: Jan 2022
Posts: 58
Hello,

The C++ compiler works fine, but when I want to use C++ standard libraries I get a lot of syntax errors.

Img1:
The include path that Zorro wants to use
I modified the compile.bat for echo the INCLUDE:
Code
@call ECHO %INCLUDE%


Img2:
When I make a new C++ console application project in Visual Studio 2022, this is the basic include path I see in Project => Properties => Configuration Properties => VCC Directories => General => Include Directories

My problem is that I can't include standard C++ libraries.

In the simple console application Visual Studio project, is totally OK to do this:
Code
#include <vector>


But when I do the same in a Zorro project, and press [Test] button, I see a lot of syntax errors in the Zorro terminal (Img3).

It founds the <vector>, but a lot of definition is missing, which is common in the Visual Studio project.
Could you help me what am I missing during the compile process?

This is the Zorro code what throws the errors:

Code
#include <zorro.h>
#include <vector>

using namespace std;

DLLFUNC void main(){
    printf("hello");
}


Thank you!

Attached Files img1.pngimg2.pngimg3.png
Last edited by NorbertSz; 09/08/22 08:53.
Re: C++ linker problems [Re: NorbertSz] #486590
09/08/22 12:48
09/08/22 12:48
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Include the Zorro header last.

Re: C++ linker problems [Re: AndrewAMD] #486591
09/08/22 13:53
09/08/22 13:53
Joined: Jan 2022
Posts: 58
N
NorbertSz Offline OP
Junior Member
NorbertSz  Offline OP
Junior Member
N

Joined: Jan 2022
Posts: 58
OUCH, thank you!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1