News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Cannot find libs ... but they are there...

Started by msdobrescu, July 23, 2016, 11:27:52 AM

Previous topic - Next topic

msdobrescu

I think there is a conflict between what gendef exports and what the linker expects as naming.
Any ideas?

msdobrescu

So mangling for msvc++ and gnu c++ differs. Is there any solution, or should I try to build anything with MinGW?

msdobrescu

Well, I've managed to build SpiderMokey with MinGW-w64.
Now, I get linkage errors 'multiple definition of...' for everything.
That code compiles under msvc.
I presume there is an issue with the project...?
I do not include cpp in cpp or h.
Any ideas?
Thanks.

stahta01

You did something wrong; with out more info no one can do anything but guess.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

msdobrescu

Yes, of course, but what? I have a project with tens if not hundreds of files.
How could I know? What should I post?

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

msdobrescu

OK. I have Code::Blocks 16.01 + MinGW-w64 x86_64-6.1.0-win32-seh-rt_v5-rev0.

The build log is attached...

stahta01

#22
Please read the build log!!

Please look at lines 55 and 66 of  "sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp"

Then fix the problem.

Edit: You may need to search for all places AllocateBlock and DeleteBlock are defined.

Tim S.


sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: first defined here
sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:66: first defined here



x86_64-w64-mingw32-g++.exe -shared   -Wl,--dll -L..\..\Mozilla\SpiderMonkey\mozjs-45.0.2.mingw\js\src\build_DBG.OBJ\dist\sdk\lib ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\ate\IText.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\ate\IThrowException.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\ASMemory.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIArtboards.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIAutoBuffer.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIColorSpace.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIFilePath.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIRefAutoSuite.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIStringFormatUtils.o" ".objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIUnicodeString.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsActionDialogStatus.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIArtboardLayout.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIArtType.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIBoolean.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIColorModel.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIColorProfile.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAICropMarkStyle.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDictionary.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentColorModelValue.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentFileFormatParameters.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentHandle.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentListSuite.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentMiPrintRecord.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentPlatformPrintRecord.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentRulerUnitValue.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentSetup.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentStartupProfile.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentSuite.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIDocumentVersionInfo.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIErr.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIFileFormatHandle.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIFileFormatOptions.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIFileFormatSuite.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIFilePath.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIInt16.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIInt32.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAINewDocumentPreset.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIPreviewMode.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIRasterResolution.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIReal.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIRealPoint.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIRealRect.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIRect.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAISpotColorMode.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAITransparencyGrid.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIUint32.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIUnicodeString.o" ".objs\jScriptor\jScriptor\Integration\Adobe Illustrator\jsAIVersion.o" ".objs\jScriptor\jScriptor\Integration\Adobe Text Engine\jsATEDocumentTextResources.o" ".objs\jScriptor\jScriptor\Integration\Adobe Text Engine\jsATEStory.o" ".objs\jScriptor\jScriptor\Integration\Adobe Text Engine\jsATETextRanges.o" .objs\jScriptor\jScriptor\Integration\jsClass.o .objs\jScriptor\jScriptor\Integration\jsConvert.o .objs\jScriptor\jScriptor\Integration\jsError.o .objs\jScriptor\jScriptor\Integration\jsProperty.o .objs\jScriptor\jScriptor\Integration\jsRTTI.o .objs\jScriptor\jScriptor\Integration\jsSuites.o .objs\jScriptor\jScriptor\Integration\jsTestSuite.o .objs\jScriptor\jScriptor\Integration\Native\jsBool.o .objs\jScriptor\jScriptor\Integration\Native\jsChar.o .objs\jScriptor\jScriptor\Integration\Native\jsCharArray.o .objs\jScriptor\jScriptor\Integration\Native\jsConstCharArray.o .objs\jScriptor\jScriptor\Integration\Native\jsFourCharacterCode.o .objs\jScriptor\jScriptor\Integration\Native\jsShort.o .objs\jScriptor\jScriptor\Integration\Native\jsVoid.o ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsPIProperty.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsPIType.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPErr.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPErrorData.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPlatformFileReference.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPlugin.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPluginList.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPluginListIterator.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPluginsSuite.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPStringPool.o" ".objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPStringsSuite.o" .objs\jScriptor\jScriptor\Source\jScriptorFileHelper.o .objs\jScriptor\jScriptor\Source\jScriptorLog.o .objs\jScriptor\jScriptor\Source\jScriptorPanelController.o .objs\jScriptor\jScriptor\Source\jScriptorParameter.o .objs\jScriptor\jScriptor\Source\jScriptorPlugin.o .objs\jScriptor\jScriptor\Source\jScriptorPreferences.o .objs\jScriptor\jScriptor\Source\jScriptorPromptDialog.o .objs\jScriptor\jScriptor\Source\jScriptorSuites.o .objs\jScriptor\jScriptor\Source\jScriptorTokenisor.o .objs\jScriptor\jScriptor\Source\jScriptorUtils.o .objs\jScriptor\jScriptor\Source\jsEngine.o .objs\jScriptor\jScriptor\Source\utils.o  .objs\jScriptor\jScriptor\Resources\Win\jScriptor.res -o jScriptor.dll -m64  -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lmozjs-45
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIUnicodeString.o: In function `ai::SPAlloc::AllocateBlock(unsigned long long)':
M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: multiple definition of `ai::SPAlloc::AllocateBlock(unsigned long long)'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIAutoBuffer.o:M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: first defined here
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIUnicodeString.o: In function `ai::SPAlloc::DeleteBlock(void*)':
M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:66: multiple definition of `ai::SPAlloc::DeleteBlock(void*)'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIAutoBuffer.o:M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:66: first defined here
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\ASMemory.o:ASMemory.cpp:(.rdata$.refptr.sSPBasic[.refptr.sSPBasic]+0x0): undefined reference to `sSPBasic'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIColorSpace.o:IAIColorSpace.cpp:(.rdata$.refptr.sAIColorSpace[.refptr.sAIColorSpace]+0x0): undefined reference to `sAIColorSpace'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIFilePath.o:IAIFilePath.cpp:(.rdata$.refptr.sAIFilePath[.refptr.sAIFilePath]+0x0): undefined reference to `sAIFilePath'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIRefAutoSuite.o:IAIRefAutoSuite.cpp:(.rdata$.refptr._ZN2ai9AutoSuite5sHeadE[.refptr._ZN2ai9AutoSuite5sHeadE]+0x0): undefined reference to `ai::AutoSuite::sHead'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIRefAutoSuite.o:IAIRefAutoSuite.cpp:(.rdata$.refptr._ZN2ai9AutoSuite8sSPBasicE[.refptr._ZN2ai9AutoSuite8sSPBasicE]+0x0): undefined reference to `ai::AutoSuite::sSPBasic'
.objs\jScriptor\jScriptor\Integration\Sweet Pea\jsSPPluginList.o:jsSPPluginList.cpp:(.rdata$.refptr.sSPPlugins[.refptr.sSPPlugins]+0x0): undefined reference to `sSPPlugins'
.objs\jScriptor\jScriptor\Source\jScriptorFileHelper.o:jScriptorFileHelper.cpp:(.rdata$.refptr.sAIUser[.refptr.sAIUser]+0x0): undefined reference to `sAIUser'
.objs\jScriptor\jScriptor\Source\jScriptorPanelController.o: In function `jScriptorPanelController::jScriptorPanelController()':
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Please read the file comments!!

This file should NOT be included in the core application.

Try removing this file from being built.


/*
*        Name: IAIAutoBuffer.cpp
*   $Revision: 1 $
*      Author:
*        Date:    
*     Purpose: Plug-in side implementation of the
* ai::AutoBuffer object interface.
* This file should NOT be included in the
* core application.
*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2004-2007 Adobe Systems Incorporated.
* All rights reserved.
*
* NOTICE:  Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the Adobe license agreement
* accompanying it. If you have received this file from a source other
* than Adobe, then your use, modification, or distribution of it
* requires the prior written permission of Adobe.
*
*/
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

I think you need to move your questions to an site that supports your compiler and supports porting this library to your compiler.

This problem likely violates the CB Rules http://forums.next.codeblocks.org/index.php/topic,9996.0.html

I would suggest downloading the Mac source code and the Windows source code if you still wish to port this library to Windows GCC; but, I think it will be very hard to do the port!! The Mac source code might be easier to port to Windows GCC.

It might be easier to do a C DLL wrapper using Visual Studio 2015; but, that is also off topic for this site!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

msdobrescu

#25
First, I do not port, I have to use it.
Secondly, it seems I misinterpreted the error.
I took the following as it was somehow compiled twice and I've wondered if C::B generated a malformed build command.


M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: multiple definition of `ai::SPAlloc::AllocateBlock(unsigned long long)'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIAutoBuffer.o:M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: first defined here


If this is not the case, thing is solved.

+ It's Adobe API poorly documented. That statement is not clear. I've no idea what "core application" means as I build a plugin.

msdobrescu

One question though.
When I add files to the project, are they automatically set to compile and link?
Especially headers, how are to be set concernng compiling and linking?

stahta01

#27
Quote from: msdobrescu on August 20, 2016, 04:45:31 PM
First, I do not port, I have to use it.
Secondly, it seems I misinterpreted the error.
I took the following as it was somehow compiled twice and I've wondered if C::B generated a malformed build command.


M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: multiple definition of `ai::SPAlloc::AllocateBlock(unsigned long long)'
.objs\Adobe\sdk\Adobe Illustrator CC_2015.3 SDK\illustratorapi\illustrator\IAIAutoBuffer.o:M:/Creative/Adobe/dev/jScriptor/Adobe/sdk/Adobe Illustrator CC_2015.3 SDK/illustratorapi/illustrator/IAIAutoBuffer.cpp:55: first defined here


If this is not the case, thing is solved.

+ It's Adobe API poorly documented. That statement is not clear. I've no idea what "core application" means as I build a plugin.

If you DO NOT wish to port it to a different compiler; then use a supported Compiler!!!!!!

Quote
***********************************************************
3. Development Environments
***********************************************************
The following platforms are supported for the development of plug-ins:

Mac OS:
  OS:  Mac OS 10.9
  IDE: Xcode 7.2.1
  Compiler for C/C++: com.apple.compilers.llvm.clang.1_0
  Base SDK: OS X 10.11
  OS X Deployment Target: OS X 10.9


Windows:
  OS:  Microsoft Windows 7 (including 32 bit)
  IDE: Microsoft Visual C++ 14 (Visual Studio 2015)

For more details, see the "Porting Guide."

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Quote from: msdobrescu on August 20, 2016, 06:21:09 PM
One question though.
When I add files to the project, are they automatically set to compile and link?
Especially headers, how are to be set concernng compiling and linking?

Source files default to compiling and linking.
Header files default to NOT compiling and NOT linking.

Tim S.
 
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

#29
Please give up on using the GCC compiler!!

If you do NOT want to; then, I suggest you need to ask someone you know and trust to explain why what you are doing is a waste of time.

FYI: Code::Blocks is a IDE that works with more than one compiler.

IF someone told you to use Code::Blocks it does NOT mean you have to use the GCC Compiler!

HINT: You are trying to build a plugin, the plugin ABI must match what the application is expecting!!
That means using the compiler the application tells you to use in nearly all cases where the API is C++.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]