pouët.net

Go to bottom

Crinkler Link Errors

category: code [glöplog]
 
I have been trying to use Crinkler as my linker but the amount of link errors that are coming out of it is driving me insane. Right now the error is:

1>LINK : error : LNK: Cannot find symbol '__imp_??1exception@std@@UAE@XZ'

I have posted some more information below. I can upload the whole VS2010 project somewhere if that will help as well. I am writing a little toy program that draws stuff based on a cube grid.

Link command:
/OUT:"C:\Users\Chris\documents\visual studio 2010\Projects\intro\Release\intro.exe" /INCREMENTAL:NO /NOLOGO "opengl32.lib" "glu32.lib" "winmm.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /NODEFAULTLIB /MANIFEST:NO /ManifestFile:"Release\intro.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\Users\Chris\documents\visual studio 2010\Projects\intro\Release\intro.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /PGD:"C:\Users\Chris\documents\visual studio 2010\Projects\intro\Release\intro.pgd" /LTCG /TLBID:1 /ENTRY:"WinMain" /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

Additional commands:
/CRINKLER /RANGE:opengl32 /COMPMODE:SLOW /ORDERTRIES:1000 /PRINT:IMPORTS /PRINT:LABELS /UNSAFEIMPORT
looks like perhaps you have to disable exception handling? Try this:

Project Properties -> C/C++ -> Code Generation -> Enable C++ Exceptions = NO

added on the 2012-09-07 08:36:23 by iq iq
turn MACHINE:ANYTHING on aswell ;)
you seem to use lots of standard-libs aswell, a tipp:
get this and start from there, delete everything until you end up with 780bytes or sth alike: Alcatraz- sprite-o-mat
I tried disabling exceptions and turned on MACHINE:ANYTHING but I'm still getting this link error:

1>LINK : error : LNK: Cannot find symbol '??1exception@std@@UAE@XZ'

I found out that the use of exceptions are coming from my use of the standard library <vector>. Maybe I need to add some more libraries?
Don't use anything from the standard libraries.
added on the 2012-09-08 21:24:50 by las las
Don't use vectors and STL.
added on the 2012-09-08 21:26:23 by LLB LLB
heres some pictures of what it looks like in linux:

BB Image
@las
@LLB

Is that the only way to get crinkler to link?
you are not linking the standard library, so of course the references cannot be resolved. And you really don't want to use STL in a 4k anyway because
a) it's big
b) you don't need it
What saga said.
added on the 2012-09-08 22:30:48 by las las
who needs VECTOR anyway. float vector[3] is all you need. not even a struct is needed, thats just comfort and wastes bytes!
hardy. he's talking about std::vector<T> that's something a bit different.
added on the 2012-09-08 22:44:11 by las las
SiliconLife : STL is not optimized for size. If you're using Crinkler, you probably want to have a file smaller than 10kb. People using STL don't mind having binaries bigger than 100kb. You have to decide what you want.

Yeah, math vector is float[3] and std::vector<T> is T[10000] or something like this. In a demo, you know how many elements you need (or you can estimate it), so you never need to resize.
added on the 2012-09-08 23:03:20 by LLB LLB
Okay I think I will change my program to use a fixed sized array instead of vector. The only reason I used vector was for the simplified push_back() calls and deletes, but since I never delete elements anyways, its kind of useless.
Seems like a good example of an over-engineered 4k then.
the good thing is, all you are going thru right now is part of the fun of making 4ks! ;) finding stuff thats wasting bytes and doing it in a new and better approach, just to save another 10 bytes, sounds few but you saved them for every 4k you are going to do in the future. :) i love 4ks. hope you will have as much fun in making 4ks as i am having.
I was able to get crinkler working and even compiled a 1.7k intro but I have been having trouble with running on other computers. The crinkler linked version runs fine on the computer I compiled it on but not on other computers.

The two vcpp projects are here, one uses crinkler and one does not:

https://dl.dropbox.com/u/5492880/intro_glsl.7z
https://dl.dropbox.com/u/5492880/intro_glsl_crinkler.7z

Any help would be greatly appreciated, the crinkler version compiles a 1.7kb but the normal one compiles into a 58kb exe
The Crinkler version runs fine here (Win7, Core 2 Duo, GTX 560Ti).

Does the non-Crinkler version run fine on the other machines?

What are the specs (primarily OS and gfxcard) of the machines you have tried it on?
added on the 2012-09-19 09:48:21 by Blueberry Blueberry
Works fine here as well. Really nice-looking effect, btw...
added on the 2012-09-19 10:24:41 by Preacher Preacher
Yep, works here too. Win7 x64 with GTX 580.
added on the 2012-09-19 10:30:17 by raizor raizor
@hArDy: Finding stuff to save bytes is fun, but everybody coding in C/C++ should brace him/herself that sooner or later one of this findings will be "better switch to asm".


And returning to the topic of vectors: *my_pointer++ = my_data; is the ultimate push_back(). :)
added on the 2012-09-19 12:03:11 by KK KK
@blueberry

Yeah I had someone tell me that the crinkled version does not run but the non-crinkler version does. But anyways, if most people here can run it then I probably have nothing to worry about.

login

Go to top