Skip to content

Conversation

@MarekKnapek
Copy link
Contributor

Fixes problem described in #183.

Before:

c:\path\to\nob.h\how_to\001_basic_usage
>cl nob.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

nob.c
Microsoft (R) Incremental Linker Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:nob.exe
nob.obj

c:\path\to\nob.h\how_to\001_basic_usage
>nob.exe
[INFO] created directory `build/`
[INFO] CMD: cl -I. -o build/hello src/hello.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
hello.c
Microsoft (R) Incremental Linker Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:hello.exe
/out:build/hello.exe
hello.obj
[INFO] CMD: cl.exe /W4 /nologo /D_CRT_SECURE_NO_WARNINGS /Fe:build/foo /Fo:build/foo src/foo.c
foo.c

c:\path\to\nob.h\how_to\001_basic_usage
>build\hello.exe
Hello, World

c:\path\to\nob.h\how_to\001_basic_usage
>build\foo.exe
Foo, bar

c:\path\to\nob.h\how_to\001_basic_usage
>

After:

c:\path\to\nob.h\how_to\001_basic_usage
>cl nob.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

nob.c
Microsoft (R) Incremental Linker Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:nob.exe
nob.obj

c:\path\to\nob.h\how_to\001_basic_usage
>nob.exe
[INFO] created directory `build/`
[INFO] CMD: cl -I. /Fe:build/hello src/hello.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35721 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

hello.c
Microsoft (R) Incremental Linker Version 14.50.35721.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:build/hello.exe
hello.obj
[INFO] CMD: cl.exe /W4 /nologo /D_CRT_SECURE_NO_WARNINGS /Fe:build/foo /Fo:build/foo src/foo.c
foo.c

c:\path\to\nob.h\how_to\001_basic_usage
>build\hello.exe
Hello, World

c:\path\to\nob.h\how_to\001_basic_usage
>build\foo.exe
Foo, bar

c:\path\to\nob.h\how_to\001_basic_usage
>

@rexim
Copy link
Member

rexim commented Jan 6, 2026

@MarekKnapek aight, looks good! Thanks!

@rexim rexim merged commit 2617461 into tsoding:main Jan 6, 2026
4 checks passed
@MarekKnapek MarekKnapek deleted the MSVC branch January 6, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants