From antoniofagardo at gmail.com Fri Dec 9 12:09:19 2011 From: antoniofagardo at gmail.com (Antoine GOSSET) Date: Fri, 9 Dec 2011 18:09:19 +0100 Subject: [Aria-users] Problem function definition is marked dllimport using codeblocks on windows 7 Message-ID: <000001ccb695$4ba83940$e2f8abc0$@gmail.com> Hi everyone ! I?m a student in a French engineering school and I have to do a point to point communication between two Pioneer P3-DX robot. For now I?m just setting the environment parameter on the computer: - I installed CodeBlocks 10.05 with MinGW (It?s a requirement for my project as we want to develop multi-platform programs) - I installed Aria from the CD given with the robots (and all others libraries too) First I wanted to check if I had correctly configured C::B so I create a new project ?console application?, I compiled and ran it and everything went fine as predicted^^ (?the famous hello world !) In the compiler settings I selected the GNU GCC compiler, in ?linker settings? I added all the .lib files from the folder MobileRobots/Aria/lib and finally in ?search directories? I added Aria/lib, Aria/include folders (I think I must have made some errors in these settings but I don?t know where ). Then I just added the line: #include ?Aria.h? on my previous program and tried to compile it I only get errors saying: C:\Program Files\MobileRobots\Aria\include\ArMutex.h|122|error: function 'void*& ArMutex::getMutex()' definition is marked dllimport| C:\Program Files\MobileRobots\Aria\include\ariaUtil.h|252|error: function 'static bool ArUtil::findFirstStringInRegistry(const char*, const char*, char*, int)' definition is marked dllimport| C:\Program Files\MobileRobots\Aria\include\ArBasePacket.h|66|error: function 'void ArBasePacket::finalizePacket()' definition is marked dllimport| ||More errors follow but not being shown.| ||Edit the max errors limit in compiler options...| ||=== Build finished: 50 errors, 8 warnings ===| I didn?t wrote here all errors as it?s very long but I only have a lot of these errors and I couldn?t find anything on the internet about it I just read a subject from 2010 about it on the codeblock forum, the guy had the same problem but nobody knew a solution to this problem So basically what I looking for is the settings parameter for codeblock so I can finally start programming ;) Thanks in advance! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/aria-users/attachments/20111209/83edc8df/attachment.html From Reed.Hedges at Adept.com Fri Dec 9 17:17:25 2011 From: Reed.Hedges at Adept.com (Reed Hedges) Date: Fri, 9 Dec 2011 14:17:25 -0800 Subject: [Aria-users] Problem function definition is marked dllimport using codeblocks on windows 7 In-Reply-To: <000001ccb695$4ba83940$e2f8abc0$@gmail.com> References: <000001ccb695$4ba83940$e2f8abc0$@gmail.com> Message-ID: <38B0EB303E4E804F8A93B5CFA8FFF15F02FE875D6B@SRV-APP-6.adept.local> Hi Antoine, Unfortunately at this point much of the ARIA code currently assumes Visual Studio if "WIN32" is defined in the preprocessor, and if not, assumes Linux. Dllimport is a Visual Studio specific directive to determine visibility of the functions in DLLs. Check if CodeBlocks is defining WIN32 in preprocessing, and if so remove it; then ARIA will assume Linux. You are not really on Linux although some of the POSIX C library (standard Unix libraries) will be available, so you will also need to make a few other modifications to ARIA header files and some source files as well depending on what libraries CodeBlocks come with (pthreads for example?). You may also want to download the Linux source distribution (ARIA-2.7.3.tgz) since the Windows version may omit some of the Linux-specific source files that might work on MinGW. You can build ARIA as a static library if you want, if that simplifies it. Define ARIASTATIC in the preprocessor ) if you are doing that. You can see the flags used to build on Linux at the top of Makefile in the Linux version. It would be nice to get ARIA building on MinGW out of the box someday, so if you do get it working and can summarize your changes (e.g. do a "diff" of releaed ARIA and your changed version) that would be useful. Reed From: aria-users-bounces at lists.mobilerobots.com [mailto:aria-users-bounces at lists.mobilerobots.com] On Behalf Of Antoine GOSSET Sent: Friday, December 09, 2011 12:09 PM To: ariausers Subject: [Aria-users] Problem function definition is marked dllimport using codeblocks on windows 7 Hi everyone ! I'm a student in a French engineering school and I have to do a point to point communication between two Pioneer P3-DX robot. For now I'm just setting the environment parameter on the computer: - I installed CodeBlocks 10.05 with MinGW (It's a requirement for my project as we want to develop multi-platform programs) - I installed Aria from the CD given with the robots (and all others libraries too) First I wanted to check if I had correctly configured C::B so I create a new project "console application", I compiled and ran it and everything went fine as predicted^^ (-->the famous hello world !) In the compiler settings I selected the GNU GCC compiler, in "linker settings" I added all the .lib files from the folder MobileRobots/Aria/lib and finally in "search directories" I added Aria/lib, Aria/include folders (I think I must have made some errors in these settings but I don't know where...). Then I just added the line: #include "Aria.h" on my previous program and tried to compile it... I only get errors saying: C:\Program Files\MobileRobots\Aria\include\ArMutex.h|122|error: function 'void*& ArMutex::getMutex()' definition is marked dllimport| C:\Program Files\MobileRobots\Aria\include\ariaUtil.h|252|error: function 'static bool ArUtil::findFirstStringInRegistry(const char*, const char*, char*, int)' definition is marked dllimport| C:\Program Files\MobileRobots\Aria\include\ArBasePacket.h|66|error: function 'void ArBasePacket::finalizePacket()' definition is marked dllimport| ||More errors follow but not being shown.| ||Edit the max errors limit in compiler options...| ||=== Build finished: 50 errors, 8 warnings ===| I didn't wrote here all errors as it's very long but I only have a lot of these errors and I couldn't find anything on the internet about it... I just read a subject from 2010 about it on the codeblock forum, the guy had the same problem but nobody knew a solution to this problem... So basically what I looking for is the settings parameter for codeblock so I can finally start programming ;) Thanks in advance! -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 13175 bytes Desc: not available Url : http://lists.mobilerobots.com/pipermail/aria-users/attachments/20111209/be229797/attachment-0001.bin