Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
void start() { stuff(); //code before mainCRTStartup mainCRTStartup(); } int main() { //other code }
Visual C ++では、正常にコンパイルされ、関数「stuff()」がmainの前に呼び出されます。「mainCRTStartup()」の前に「stuff()」をどのように呼び出しますか?Mingw(OS:Windows NT)で?「voidstart()」を無視しているようです。
ld(リンカ)への-e引数を使用しstartて、エントリポイントとして指定できます。
ld
start
ldmingwを使用するための引数をフィードする方法がわかりません。おそらく誰かが私の答えを編集してそれを提供することができます。
実際のエントリポイントは常にstart()です。
start()
start()mainCRTStartup()CRT関数を初期化して呼び出す呼び出し。main()したがって、stuff()では、CRT関数を使用できません。
mainCRTStartup()
main()
stuff()