Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. linker options casts out "new"

linker options casts out "new"

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpvisual-studiodebugginghelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spiritofamerica
    wrote on last edited by
    #1

    hello I have a question In order to make smaller exes I use some linker options that I got form somewhere I forgot from where I understand pretty much what they do exept one : #pragma comment(linker,"/base:0x13140000") Anyway that is besides the point I put these options: #pragma optimize("gsy",on) #pragma comment(linker,"/RELEASE") #pragma comment(linker,"/ENTRY:main") #pragma comment(linker,"/MERGE:.rdata=.data") #pragma comment(linker,"/MERGE:.text=.data") #pragma comment(linker,"/MERGE:.reloc=.data") #pragma comment(linker,"/SECTION:.text,EWR /IGNORE:4078") #pragma comment(linker,"/FILEALIGN:0x200") #pragma comment(linker,"/base:0x13140000") #pragma comment(linker,"/stub:stub.exe") in a vc 7 win32 empty project and when i put this: void main() { char * ce_scrie=new char[100]; } the project is buildable but then it gives out a error of the debug don't send kind(you know) and when I debug it I get a wierd error I have yet to see Unhandled exception at 0x77f5171c in versiune_de_ie.exe: 0xC0000005: Access violation reading location 0x00000010. the same stuff with vc 6 gets me this: C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2065: 'new' : undeclared identifier C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : warning C4047: 'initializing' : 'char *' differs in levels of indirection from 'int ' C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2143: syntax error : missing ';' before 'type' C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : error C2143: syntax error : missing ';' before '[' C:\Program Files\Microsoft Visual Studio\MyProjects\SmallVcExe\SmallVcExe.c(31) : warning C4091: ' ' : ignored on left of 'char ' when no variable is declared why is this?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups