..ld.exe..

BlitzMax Forums/BlitzMax Programming/..ld.exe..

Naughty Alien(Posted 2016) [#1]
..hi guys..im messing with serial.mod (Brucey)..module is built properly and that part went fine..however, when i try to run one of examples provided, im getting this error, shown on pic..and i do not know what does this mean really..ld.exe does exists inside folder error is pointing at..i mean, whats wrong here ?




DStastny(Posted 2016) [#2]
The error indicates the library libsetupapi.a is missing and not on search path.


DStastny(Posted 2016) [#3]
Look in you mingw installation libs directory for the file and copy the file to your blitmax lib directory and you it should fix it.


Naughty Alien(Posted 2016) [#4]
..i did that, and now i have received this bunch of errors, when try to compile..


..if I try to build module trough command prompt, i get this error..



..but if i select same module inside Blide and build, it says, its successfully built..huh..



..any ideas.. ?


DStastny(Posted 2016) [#5]
The linker errors look like incompatible versions of g++ which might cause the linking errors. The attempt to rebuild module should have fixed that but the helpful error with the bmk makemod doesnt help...

I don't have BlitzMax configured at moment so I'm trying to remember off top of my head if there is a verbose mod or not.

What version of Mingw are you using? And are the libs and bintools same version in the blitz\bin and mingw\bin?


DStastny(Posted 2016) [#6]
I was able to remote into my old machine and play around with bmk. Based upon the error there appears to be some mis-configuration of mingw. I could get bmk to fail with similar unhelpful error if i removed mingw from the search path.

Check your mingw variable and that you can run gcc -v on command line

Hope that helps.
Doug


Naughty Alien(Posted 2016) [#7]
..i did set environment variable and GCC runs from command line and i can also build module trough command line now..building error when i hit compile (example), still appear as it is on image in my previous thread..sigh..


Naughty Alien(Posted 2016) [#8]
..okay..i have downloaded and compiled bmk (original one is in backup)..now when i want to compile example, no more error messages, except this one..



Im not sure, where to set this path ??


Naughty Alien(Posted 2016) [#9]
..well..i got it working..target folder name was i686-pc-mingw32, so i made copy of it and renamed as error shows and it works now..

EDIT:
..now maxgui cant compile..oh man..back to Java..screw this..


Derron(Posted 2016) [#10]
Use Brucey's BMK and place the MinGW of your choice in BlitzMax/MinGW32 - it should prefer these files when doing its job.

Then recompile all modules (so they use the same basement). When MaxGUI has troubles then, use nother MinGW-Package.
If you use the variants of brl.mod/pub.mod/whatevermod from github.com/maxmods, they should work with TDM 5.1 or so (as this is what I think Brucey is using). I am using "4.6" for rtAudio (non-NG-edition) and have used "4.7" when it came to wxMax. Never tried maxGUI on Windows, so cannot say more.


bye
Ron


Naughty Alien(Posted 2016) [#11]
..I did all that, every module rebuilt with no errors, including BRL modules, but at the end it says, cant link and stop compilation when i try to run my program(just some maxgui menus)..i mean, probably its me, missing something, but i cant find any definitive guide how to do this and continue writing my code, instead of fighting language setup..


Derron(Posted 2016) [#12]
Ok, I tried it now (in a previous "Blitzmax/MinGW free" XP-VM).

- downloaded BlitzMax 1.50
- downloaded tdm-gcc-4.7.1-2.exe (might work with others too)
- installed BlitzMax to "e:\BlitzMax"
- installed tdm-gcc to e:\BlitzMax\MinGW32 (disabled "add to startmenu / add to path" during installation setup)
- downloaded current BMK-NG and build it (threaded)
- copied "bmk.exe" and "core.bmk", "make.bmk" to "e:\BlitzMax\bin\"
- renamed "e:\BlitzMax\lib" to "e:\BlitzMax\__lib" so it wont be found by another bmk.exe
- started MaxIDE
- let it build all docs
- "rebuild modules" was greyed out (blitzmax not within path...)
- went to command prompt and rebuild all modules via "e:\BlitzMax\bin\bmk.exe makemods -a -quick" (-quick skips some lookups)
(Brucey's bmk would auto-compile modules which were not compiled yet, but as we installed from the installer, we already got these precompiled files)

- waited a bit (single core VM ;-) - so about 15-20 minutes :-))
- opened up "e:\BlitzMax\samples\maxgui\imagedrop.bmx"
- compiled ...and failed "cannot find -lunicows"
- copied "libunicows.a" from "e:\BlitzMax\__lib" to "E:\BlitzMax\MinGW32\lib"
- compiled again, linked successfully, executed successfully

That unicows-step might be not neccessary, if your MinGW-setup already provides this file.



bye
Ron


Brucey(Posted 2016) [#13]
libunicows is a hack to get XP (or even Windows 9X) to do Unicode stuff.
The requirement (link) was added to MaxGUI at some point, but I don't like it.
In theory, you could take the import out of the code and your stuff will still work.


Naughty Alien(Posted 2016) [#14]
..okay..now everything works..what i did is, i compiled with Brucey BMK all bah modules, and rest of the modules come with BMX originally, compiled with original BMK, and left original BMK in bmax bin folder..everything works, without error, including Maxgui and serial.mod i was after (i needed to upload firmware on to some Atmel boards and Siemens inverters trough serial USB)..
..thank you guys, for assistance..


Derron(Posted 2016) [#15]
You'd better try to create a clean working installation... now as your app is running.

Mixing precompiled modules with new ones...is able to create trouble if different minGW-versions were used.

Bruceys bmk should be working with vanilla too..it j)"just" adds
Pre /post compilation scripts
Auto module compilation
Local minGW Installation
...

But still should do what the vanilla one does.


bye
Ron