There is an extra linker options parameter you can pass. The problem is that I forgot what it was called and am out of office now. @mh do you have these handy
In VS2019, I dont see for the raylib-project (which is a .lib project) the option “Librian” it has also the section “Commandline arguments”
like this:
But sadly, when building, LInker complains and saays: Unknown option - /NODEFAULTLIB:OLDNAMES.lib is being ignored.
@ck nvm I will get it working somehow, the info you gave me should saffice and get a good holiday man, didnt want to stress alot with this, tbh didnt ever thought this would cause so many troubles but everything C++/Compiler is involved is the pure definition of troubles
Sven,
theres two separate things you’re mixing up
(a) options for the C project (that’d be /NODEFAULTLIB
). I cant help you there, as I don;'t know VC++ anymore — but I’m sure this is Googlable hoe to do
(b) linker options to set in the Elements projects. There’s a bug, and it seems that setting is currently only exposed for Cocoa projects, not Island. I will fix that for tomorrow, until then you can add it manually in the .elements
file via a text editor, in the top <PropertyGroup>
section, such as:
<LinkerOptions>/nodefaultlib:oldnames.lib</LinkerOptions>
to try Carlo’s suggestion.
Again, or just find both libs on yr system (they must be there), and add them t the Import project as ImportLinkLibraries with CopyLocal set to true, just as raylib.lib
. Or have you already tried that?
Marc, I found both libs, and imported both into the .sln… sadly same error as b4, i will attachyou the project. Maybe you see smth.NearlyImportedLIB (2).zip (4.4 MB)
Yes, checked for copylocal and importLinkLibrary, both set, and all other options were same, so same targetplatform and so on…
BTW, theres no need to set the Header Search Path on every single level; ditto the SDK. This suffices:
That said, for one: msvcrtd.lib ≠ MSVCRT.lib, but that doesn’t seem to be the problem, as old names has the right name, and even if I rename msvcrtd.lib, it doesn’t work.
I’ll have to pass this back to @ck, I’m afraid:
@ck, all three libs are passed to the linker, and exist at those paths:
"/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/ImportProject-EE9B73958A63EBD70882B5285E8BAC4D0160871E/Debug/Island-Windows/x86_64/msvcrtd.lib"
"/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/ImportProject-EE9B73958A63EBD70882B5285E8BAC4D0160871E/Debug/Island-Windows/x86_64/oldnames.lib"
"/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/ImportProject-EE9B73958A63EBD70882B5285E8BAC4D0160871E/Debug/Island-Windows/x86_64/raylib.lib"
@mh ahh yea u right, i didnt saw the little sneaky “d” in the msvcrt.lib, my bad… to the rest, yea i just didnt know what do do else anymore tbh man xD
Sry for that in that time, as I said, enjoy your holiday, i mean log it and work on it after ur holidays/vacation of the like you guys have, wasnt my intention to rob the time away from you now!
So I think the best approach is to remove mscvrt.lib/oldnames.lib from the import project. We have several functions in Islandrtl that conflict with those.
If we pass:
/nodefaultlib:oldnames.lib /nodefaultlib:msvcrt.lib
In Linker (LLD) Options.
It properly fails on missing symbols. Then the tricky part:
Implementing the missing functions.
I have a set of them already, and some tweaks in your import project to force importing symbols from kernel32/user32.
rayrayl.zip (6.2 MB)
To get started.
What I did:
<ImportDefs>IsProcessorFeaturePresent;DragQueryFileW;DragQueryPoint;DragFinish;DragAcceptFiles;SystemParametersInfoW;MonitorFromWindow;GetMonitorInfoW;EnumDisplayMonitors;GetRawInputData;GetRawInputDeviceInfoA;RegisterRawInputDevices;GetRawInputDeviceList;ClientToScreen;GetWindowLongW;SetWindowLongW;GetClassLongW;LoadCursorW;DestroyIcon;LoadImageW;CreateIconIndirect;ChangeDisplaySettingsExW;EnumDisplaySettingsW;EnumDisplaySettingsExW;EnumDisplayDevicesW;ScreenToClient;WindowFromPoint;ClipCursor;SetRect;PtInRect;GetDC;ReleaseDC;SetForegroundWindow;RedrawWindow;GetPropW;SetPropW;RemovePropW;SetWindowTextW;GetClientRect;GetWindowRect;AdjustWindowRectEx;SetCursorPos;SetCursor;GetCursorPos;ClientToWindow;IsWindowVisible;IsIconic;BringWindowToTop;IsZoomed;OpenClipboard;CloseClipboard;SetClipboardData;GetClipboardData;EmptyClipboard;SetFocus;GetActiveWindow;GetKeyState;ToUnicode;MapVirtualKey;SetCapture;ReleaseCapture;MsgWaitForMultipleObjects;GetSystemMetrics;GetWindowPlacement;SetWindowPlacement;TlsFree;DispatchMessage;PeekMessageW;GetMessageTime;SendMessageW;RegisterDeviceNotificationW;UnregisterDeviceNotification;PostMessageW;WaitMessage;DefWindowProcW;UnregisterClassW;RegisterClassExW;CreateWindowExW;DestroyWindow;ShowWindow;GetLayeredWindowAttributes;SetLayeredWindowAttributes;FlashWindow;MoveWindow;SetWindowPos;VerSetConditionMask;FormatMessageW;ChoosePixelFormat;CreateBitmap;CreateDCW;CreateRectRgn;DeleteDC;DeleteObject;DescribePixelFormat;GetDeviceCaps;SetPixelFormat;QueryPerformanceCounter;QueryPerformanceFrequency;timeBeginPeriod;timeEndPeriod;TlsAlloc;TlsGetValue;TlsSetValue;LoadLibraryA;GlobalUnlock;GlobalLock;SetThreadExecutionState;CreateDIBSection;GetDeviceGammaRamp;SetDeviceGammaRamp;SwapBuffers;TrackMouseEvent;TranslateMessage;GetClassLongPtrW;fgetc;ungetc;</ImportDefs>
This copies the import sigs from kernel32 (rtl.fx) and friends that are used by RayLib.
The second bit is a set of implementations for the missing C functions. There are a few more though, and probably some debugging to do.
Do you think you can get somewhere with this though?
Carlo thx first of all for the big work you do, much appreciated.
Second, Let me test this.
sry that it took so long I was occupied with something on the engine…
Ok I legit downloaded the attached .zip, extracted and only changed so far the header-location sincec it was still defined from ur local download folder on ur machine. So I changed that to my raylib.h location and it gave me
9 errors saying undefined symbols: I could do those my self, dont worry, the only thing tho, which im worried is why we have to define anything of those ourselves, cant the linker find the appropiate symbols from the rtl.fc?
BTW: forgot to say and praise that atleast itt doesnt give me anymore “undefined symbol: __BeginDrawing” so very ncie here, I mean apparently If i would implement the other symbols it should work then, if these are the only 9 missing. But as I said, im wondering why he cant find those by himselfs and even I have seen that you already have writen code urself to replace the logic, does that mean that that code didnt exist at all b4 or the linker just couldnt find it?