error: api32: No such file or directory

2011-12-27
2013-06-06
  • Emanuel Falkenauer
    Emanuel Falkenauer
    2011-12-27

    Hello,

    I have a perfectly running MingW64, was able to build a fairly large DLL that runs perfectly (excellent job, guys!). But now I'm trying to build another DLL (fairly big project as well) and out of nowhere, dllwrap issues the following error:

    x86_64-w64-mingw32-dllwrap -static -output-def olepmgcc.def -driver-name x86_64-w64-mingw32-c++ -export-all-symbols -mtune=native -march=native -msse2 -mfpmath=sse  -LC:/MinGW/lib -LC:/MinGW64/lib -add-stdcall-alias -mthreads -O3 -o AM3gga.dll dllobjs/am3indi.o dllobjs/am3main.o dllobjs/display2.o dllobjs/EMalgo.o dllobjs/savehtml.o dllobjs/Dchpindi.o dllobjs/ColorScheme.o dllobjs/convexhull.o dllobjs/convexhull3D.o dllobjs/ClassComp.o dllobjs/display.o dllobjs/DisplayClosest.o dllobjs/displayevent.o dllobjs/disputi.o dllobjs/grp2obj.o dllobjs/ODAMColorTable.o dllobjs/ODAMCompTable.o dllobjs/ODAMRawTable.o dllobjs/ODAMSearchTableTab0.o dllobjs/ODAMSearchTableTab1.o dllobjs/ODAMTabControl.o dllobjs/ODAMTabControlSearch.o dllobjs/ODAMTable.o dllobjs/ODTable.o dllobjs/efgathrd.o dllobjs/efga.o dllobjs/efdll.o dllobjs/Efgrp.o dllobjs/matrix.o dllobjs/ODCheckBox.o dllobjs/ODEditField.o dllobjs/ODScrollBar.o dllobjs/ODSlider.o dllobjs/ODTabControl.o dllobjs/PolyRender.o dllobjs/stats.o dllobjs/TaskCurves.o dllobjs/timing.o dllobjs/GAHtml.o dllobjs/CClock.o dllobjs/am2indi.o dllobjs/classdisplay.o dllobjs/ODScrollBarW.o dllobjs/ODAMClassMarkerTable.o dllobjs/ODMainControl.o dllobjs/ODAMExpTable.o dllobjs/loadsaveamp.o dllobjs/jacobi.o dllobjs/ODAMReorderTable.o dllobjs/ODAMTabInfoParamTable.o dllobjs/ODAMGeneTable.o dllobjs/CClockLoad.o dllobjs/CSockPro.o dllobjs/ODButtonArrow.o dllobjs/ODButton.o dllobjs/graphheader.o dllobjs/ODapplic.o dllobjs/Dchpapp.o dllobjs/AM2app.o dllobjs/AM3app.o dllobjs/ODAnnotDB.o dllobjs/ODAMSearchTableWWW.o dllobjs/GADialog.o dllobjs/AMClPreference.o dllobjs/ShowPCAWindow.o dllobjs/AMPreferences.o dllobjs/AMSaveHeatMap.o dllobjs/ChooseColorScheme.o dllobjs/ChoosePublish.o dllobjs/Copy2Clipboard.o dllobjs/AMHeatMapView.o dllobjs/ODView.o dllobjs/ChooseSave.o dllobjs/BeforeLoadClip.o dllobjs/ColSchemeToClip.o dllobjs/ListInspector.o dllobjs/ChooseContrast.o dllobjs/ChooseCMPublish.o dllobjs/ChooseParameters.o dllobjs/ChooseSaveCM.o dllobjs/ODEditFieldJust.o dllobjs/ExpTreeWindow.o dllobjs/ExpTreeUnderway.o dllobjs/FishEyeWin.o dllobjs/displaya.o dllobjs/ChoosePublishTree.o dllobjs/ChooseTreeParam.o dllobjs/ChooseAxis.o dllobjs/ChooseFilterParam.o dllobjs/RawWindow.o dllobjs/CurvesInspector.o dllobjs/ODFullTable.o dllobjs/DataImport.o dllobjs/BaryGraph.o dllobjs/ChipDatabaseviewer.o dllobjs/ChipDatabase.o dllobjs/ODDirExplorer.o dllobjs/ODStringViewer.o dllobjs/ExpMergerSaveDialog.o dllobjs/ExpMerger.o dllobjs/FilterDataset.o dllobjs/NewUserFilter.o dllobjs/ODGetText.o dllobjs/ODSpreadSheet.o dllobjs/EditAttributes.o dllobjs/FilterListInspector.o dllobjs/ExcludeExp.o dllobjs/DataBrowser.o dllobjs/SaveBrowser.o dllobjs/StdProgressWin.o dllobjs/ODTimeDate.o dllobjs/ChooseHullMode.o dllobjs/PublishHTML3D.o dllobjs/PublishHTML3DCM.o dllobjs/PublishHTMLclusters.o dllobjs/UpdateVersion.o dllobjs/ODOpenFile.o dllobjs/PublishHTMLFull.o dllobjs/ProjectNotesWin.o dllobjs/TextEditWindow.o dllobjs/UpdateLicence.o dllobjs/Dchpinst.o dllobjs/am2inst.o dllobjs/EditExtAddOnsWindow.o dllobjs/ExtAddOns.o dllobj
    s/ExtAddOnsWindow.o dllobjs/FillInputStream.o dllobjs/prgspawn.o dllobjs/ExtAddOnRunFront.o dllobjs/ODcommCrypt.o dllobjs/slavethread.o -lpthread -mwindows -lwsock32 -lole32 -lwtsapi32 -Wl,"C:\Program Files\Java\jdk1.6.0_26"/jre/bin/jawt.dll
    x86_64-w64-mingw32-dllwrap: no export definition file provided.
    Creating one, but that may not be what you want
    x86_64-w64-mingw32-c++: error: api32: No such file or directory
    x86_64-w64-mingw32-dllwrap: x86_64-w64-mingw32-c++ exited with status 1
    mingw32-make: ***  Error 1

    As you can see in the command, I am NOT trying to link with api32 - any idea where the need for "api32" could come from?

    Many thanks for your kind help,

    Emanuel

     
  • Jonathan Yong
    Jonathan Yong
    2011-12-27

    Try using x86_64-w64-mingw32-c++ -shared instead of dllwrap, not sure if it'll help.

     
  • Emanuel Falkenauer
    Emanuel Falkenauer
    2011-12-28

    Hi Jon,

    Thanks for your reply, I'll try that! But… I'll be damned: the DLL actually IS produced, and appears to be ok! That is a pleasant surprise indeed… but still, any idea where that scary "error" could come from? The thing is that the other equally large project does not report it, which seems illogical and slightly disturbing.

    Many thanks and happy New Year,

    Emanuel

     
  • Jonathan Yong
    Jonathan Yong
    2011-12-28

    I'm not sure what is wrong with dllwrap, normally, I would avoid using dlltool or dllwrap and let GCC do its stuff.

    There are a few tangential details I noticed about your build command (its good if you have time to fix it, I'll be happy to give advice). This project looks like it was hastily converted to build for win64.

    win64 doesn't have stdcall, so -add-stdcall-alias is no op, -export-all-symbols is normally a bad practice (you want to export everything? Really? Including internal implementation APIs?), and you should use -lws2_32 instead of -lwsock32.