News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Installing the ACE Threads package on C::B

Started by Tom_E, January 05, 2006, 04:43:32 PM

Previous topic - Next topic

Tom_E

Hello.

I am a Computer Science student and have just recently discovered the wonderful C::B IDE.
being the said (read "sad"  :) ) student, i recieved and assignment that requires working
with the ACE (Description) package.

I work with the MinGW compiler since all our code is checked on Linux systems and i dont have Linux installed at home. Now, I have made C::B work with MinGW, that was easy even for me, but I couldnt get the ACE package to work.

If any C++ expert can take a look at the site and explain how to get it to work on C::B  or anyone has experience working with the package and can explain, I would be very greatful.

thanks in advance.


thomas

Wow, I just tried to build this beast. Now I know why you said "sad" ;)
Given the fact it comes with a .DSW file, I thought "why, it can't be so hard", and dragged that onto Code::Blocks...

5 minutes later, it was still loading when my machine ran out of virtual memory...

Stand by, I'll try on ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

thomas

Ok, next step, I tried MSYS with ./configure and make.

After running for a while, it failed and showed the message "Please use the stock ACE build procedure detailed in the file 'ACE-INSTALL.html'.

And Io and behold, there is a section on how to build that package with MSYS and MinGW :)

So, you have to download the MSYS package (in case you don't have that yet), and follow the instructions in the ACE-INSTALL.html document. I haven't tried those because it is a bit lenghty, but I guess  you will get along with that :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Tom_E


Michael

If I remember correctly, there is ACE package for DEV-C++. I have no tried it yet, but may be it would be possible to import it in C::B and use it. I think it would be worth a try.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Tom_E

here's an update:

I've successfully built the DLL and ".a" file the install page says i had to build, i've written a small code and compiled it. It compiled fine, no syntax or code errors, but i got an error that has something to do with Linking.

it said:
"#error You must link against multi-threaded libraries when using ACE (check your project settings)"

i've scanned extensivly though C::B options and did not find anything regarding MultiThreading in the GNU GCC compiler switches. BUT i have found these exact switches in the MS VC toolkit compiler options.

now i dont even have that installed, and i have no idea what to tell the MinGW maker so it wont use MultiThreading.

any ideas?

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Tom_E

looks good! i'm testing it now with more code. thanks for the help!

lawina


mtk

Hello fellow Tom...
I've tried Installing the ACE_DevPack, and recieved a size error while downloading.
I tried to manually download the Pack & install, it seems OK.

but compiling projects still doesn't work.

Any compiler options that I shouls change?

Michael

Quote from: mtk on January 15, 2006, 08:32:38 AM
but compiling projects still doesn't work.

Any compiler options that I shouls change?

Hello,

it would be good if you can give some info about your C::B version and the problems you have had.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

mtk

The C::B version is:1.0rc2

the problem is that compiling this:
#include "ace/OS.h"
#include "ace/Task.h"
#include <iostream>
#include <string>

int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}


returned the attached errors.

[attachment deleted by admin]

Michael

Hello,

Having a look at your errors, I have remarked that:


  • You must link against multi-threaded libraries when using ACE. Thomas has given a link above. Did you try it?
  • Some of your header files are not found (i.e., No such file or directory). This generates errors (of course). Did you correctly include the path of the included files (Project-->Build options-->Directories-->Compiler)?

Best wishes,
Michael

PS.: I would also suggest you to use the latest nightly build instead of RC2. Or compile the latest SVN revision by yourself (easy and worth).
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

mtk

Sorry didn't see thomas' remarks...
where exactly do I have to add this option?

About the included files, I didn't add them because I used the pack, so I assumed this is done for me...

Michael

Quote from: mtk on January 17, 2006, 01:54:37 PM
Sorry didn't see thomas' remarks...
where exactly do I have to add this option?

Try to "other compiler options".

Quote from: mtk on January 17, 2006, 01:54:37 PM
About the included files, I didn't add them because I used the pack, so I assumed this is done for me...

Even if you just use already compiled libraries, you should always add the header files. Normally, they are stored into an include directory.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]