C++ libs

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

C++ libs

Postby Leadwerks » Mon Aug 23, 2010 4:41 pm

I understand GCC and MS Visual Studio use entirely different formats for their static libraries. How do you use the Newton .lib files with the GCC compiler? :shock:
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: C++ libs

Postby Julio Jerez » Mon Aug 23, 2010 5:39 pm

they are just libNewton.so for dll an libNewton.a for static libraris

are you talking Gcc on PC or on Linux?
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby Leadwerks » Mon Aug 23, 2010 7:15 pm

GCC on Windows.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: C++ libs

Postby Julio Jerez » Mon Aug 23, 2010 7:59 pm

for that you I need to make MinGW build.
There is one build but it is old, and I need to update it.

I see if I can do it tonigh of tomorrow.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby Carli » Tue Aug 24, 2010 4:06 am

Would it be a solution to just make MinGW builds and to use Tools to generate the .lib for all VisualStudio Versions?
Carli
 
Posts: 245
Joined: Fri Oct 02, 2009 5:28 am

Re: C++ libs

Postby Julio Jerez » Tue Aug 24, 2010 9:31 am

Carli wrote:Would it be a solution to just make MinGW builds and to use Tools to generate the .lib for all VisualStudio Versions?

I did not get that.

The reason to use MingGW is to make GCC libraries, I woudl love use GCC 4.x.x in windows since the Linux and Mac build of Newton with GCC 4
are about twice as fast as they are in Visual studio, but I tried this in the PC they were slower,
but I have to say that the last time I tried there was no GCC 4.x.x for MinGw only 3.x.x
and it was not ontil GCC4 that the Linux and Mac Version became fater that and of teh Visual studio.
It look like GCC 4 is teh best version of GCC for x86 platform yet.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby Carli » Tue Aug 24, 2010 9:52 am

Julio Jerez wrote:It look like GCC 4 is teh best version of GCC for x86 platform yet.


don't forget about the intel compiler ;)
Carli
 
Posts: 245
Joined: Fri Oct 02, 2009 5:28 am

Re: C++ libs

Postby thedmd » Tue Aug 24, 2010 11:06 am

Is somebody using Intel compiler together with Newton? I guess not. I'm happy to be corrected if I'm wrong. : )

Latest MinGW GCC version is 4.5.0. From my point of view it is first one which is not crippled. 4.5.0 is able to produce static and shared builds and link both static and shared run-time. I had issues with all previous versions, because they had broken support for TLS in static libraries.
thedmd
 

Re: C++ libs

Postby Leadwerks » Tue Aug 24, 2010 12:00 pm

If it's only a C interface it should work with both GCC and MSVC.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: C++ libs

Postby Julio Jerez » Tue Aug 24, 2010 2:18 pm

I use intell 8.0 about 5 years ago, and also few month ago version 10.0 evaluation in linux and pc

Intel 8.0 left me with a very sour taste. It was full of Bugs and generated very poor and defective code on AMD systems.
It tooks me lot of time to find out one neferios Bug on AMD systems.
Intel compuler resullved sin and cos using SSE code for small angle, and x87 if the angle is large, but AMD did not have SSE, so when runniong AMD
so the code resulted if some assembler code for small angle on AMD but is was wrong so the value was always 0.

when I relesed the engione for Game studio using Intel 8.0 the Large majority of people using Game Studio had AMD system, so I could never see the problem.
It was not until Thomas send me an Emal explaining the diffrence between AMD and Intel CPU.
I reported this to Intel user forum but they just ignored me.
and that was not the only problem, when using auto vectorization an universal build,
The Open Mp implemention was slower than normal one.
it just generated huge binaries but non of then beat Visual stdio 6 or Visual stidio 2003
so I decided to cut Intel compiler.

Maybe it is better now, but the effort to get the extra kick plus if any, plus the fact that cost $600.00
it is too much for me.

I wich some one make a plugin of GCC for visual studio, that will be awesome.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby Julio Jerez » Tue Aug 24, 2010 2:19 pm

Leadwerks wrote:If it's only a C interface it should work with both GCC and MSVC.


I beleieve is does, there are some peopel who use integrate newton.lib using CodeBlock i think.
I did it once.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby thedmd » Tue Aug 24, 2010 5:17 pm

Code::Block can handle multiple compilers, so newton.lib probably was used together with MSVC++.

Shared library (DLL) with C interface will work with almost everything. Static libraries will not, unfortunately.

I was not aware Intel compiler did such tricks. Good to know.
thedmd
 

Re: C++ libs

Postby Julio Jerez » Tue Aug 24, 2010 5:35 pm

Oh ues I think it uses the DLL, and also nwo tha I remebr I was selecting VS as compiler.

But anyway the best ot to use MingW and make a native gcc, .a and .so or whatever it is that they cally it
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: C++ libs

Postby thedmd » Tue Aug 24, 2010 6:04 pm

I agree.
thedmd
 


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 51 guests